Artifact identification in EEG measurements

ABSTRACT

Methods, systems, and computer programs encoded on a computer storage medium, for improving EEG measurements by identifying artifacts present in EEG measurements and providing a real-time indication to a user of likely artifacts in EEG measurements are described. EEG measurements of a patient can be obtained by placing a wearable device or EEG cap on a patient&#39;s head. Sensors in the cap provide EEG data to a computing device that processes the data to identify one or more artifacts in the EEG data. The artifacts can be identified by conducting one or more operations of determining the signal to noise ratio of the line noise, calculating mutual information between sensor pairs, and applying the p-welch method. Based on the types of artifacts identified, the computing device can output an indicator that provides feedback to the technician performing an EEG test to make adjustments to the test setup.

FIELD

This disclosure generally relates to EEG measurements.

BACKGROUND

Electrical signals of the brain can be measured using brainwavemeasurement systems such as electroencephalogram (EEG) machines. Thequality of brain signal data obtained by EEG systems varies widely andcan be susceptible to noise and inaccuracies.

SUMMARY

This specification describes systems, methods, devices, and otherimplementations for improving EEG measurements by identifying artifactsin EEG measurements and providing a real-time indication of likelyartifacts that are contributing noise to EEG measurements to a user. Theindication can also be accompanied with recommendations on how to adjustthe EEG measurement setup so that improved EEG measurements can beobtained.

EEG measurements of a patient can be obtained by placing a wearabledevice or EEG cap on a patient's head. Sensors in the wearable deviceprovide EEG data to a computing device that processes the data toidentify one or more artifacts in the EEG data. In some examples, theartifacts are identified by conducting one or more operations ofdetermining the signal to noise ratio of line noise, calculating mutualinformation between sensor pairs, and applying the p-welch method. Basedon the types of artifacts identified, the computing device can output anindicator that provides feedback to the technician performing an EEGtest to make adjustments to the test setup. For instance, the computingdevice can indicate to the technician whether errors in the obtained EEGdata are due to environmental noise, patient noise (e.g., patientmovement), and/or poor sensor contact with a patient's skull. Thetechnician may then take corrective action and obtain new EEGmeasurements so that improved and more reliable EEG data can be obtainedfor patients.

In general, innovative aspects of the subject matter described in thisspecification can be embodied in a computer-implemented method thatinclude one or more operations executed by one or more processors. Theoperations include obtaining brainwave data from a wearable devicecomprising brainwave sensors. A determination that an artifact is likelypresent in the brainwave data is made by performing one or more of linenoise signal to noise ratio (SNR)-based determination, a mutualinformation determination, and a P-welch method. An output messagetemplate corresponding to the artifact that is likely present in thebrainwave data is obtained. An output indicative of a quality of thebrainwave data is generated based on the output message templatecorresponding to the artifact that is likely present in the brainwavedata.

In some implementations, the operation of determining that an artifactis likely present in the brainwave data by performing the line noisesignal to noise ratio (SNR)-based determination includes the operationsof: generating frequency brainwave data from the brainwave data obtainedfrom the brainwave sensor; generating a power spectrum of the frequencybrainwave data; determining a signal to noise ratio across the powerspectrum; and determining a signal to noise ratio peak at apredetermined frequency associated with one or more of a utility linefrequency, power line frequency, and an alternating current frequency.

In some implementations, the operation of determining that an artifactis likely present in the brainwave data by performing the mutualinformation determination includes the operations of: determining amutual information value between two sensors of the brainwave sensors;and determining that the mutual information value is greater than orequal to a threshold value.

In some implementations, the operation of determining that an artifactis likely present in the brainwave data by performing the p-welch methodincludes the operations of: generating frequency brainwave data from thebrainwave data obtained from the brainwave sensor; generating a powerspectrum of the frequency brainwave data; applying a first degreepolynomial to a logged representation of the power spectrum; anddetermining that a slope of the first degree polynomial or shape of thelogged representation of the power spectrum corresponds to a slope orshape associated with an artifact.

In some implementations, the operation of determining that an artifactis likely present in the brainwave data includes performing two or moreof the line noise signal to noise ratio (SNR)-based determination, themutual information-based determination, and the P-welch method.

In some implementations, the operations of the computer-implementedmethod further include identifying one or more of a participant-basedartifact, environmental artifact, and a cap-based artifact in thebrainwave data in response to determining that an artifact is likelypresent in the brainwave data.

In some implementations, the operation of identifying one or more of aparticipant-based artifact, environmental artifact, and a cap-basedartifact in the brainwave data in response to determining that anartifact is likely present in the brainwave data includes the operationsof: determining an outcome of performing the one or more of line noisesignal to noise ratio (SNR)-based determination, a mutual informationdetermination, and a p-welch method; obtaining artifact models from anartifact database; comparing the outcome to the artifact models;determining that a similarity between the outcome and one of theartifact models satisfies a similarity threshold; and determining thatthe brainwave data includes one or more of a participant-based artifact,environmental artifact, and a cap-based artifact in response todetermining that the similarity threshold is satisfied.

In some implementations, the artifact models are generated using aneural network and training data.

In some implementations, the operation of obtaining the output messagetemplate corresponding to the artifact that is likely present in thebrainwave data includes transmitting and receiving operations. Inparticular, a request for an output message template corresponding tothe one or more of a participant-based artifact, environmental artifact,and a cap-based artifact identified in the brainwave data is transmittedto a mapping table database, and the output message template is receivedfrom the mapping table database.

In some implementations, the output generated based on the outputmessage template includes a recommendation for eliminating the one ormore of a participant-based artifact, environmental artifact, and acap-based artifact identified in the brainwave data.

According to some implementations, a system includes a wearable deviceand a data processor. The wearable device includes brainwave sensorsthat are configured to obtained brainwave data. The data processor iscommunicably coupled to the brainwave sensors. The data processor isconfigured to determine that an artifact is likely present in thebrainwave data by performing one or more of line noise signal to noiseratio (SNR)-based determination, a mutual information determination, anda p-welch method. The data processor is configured to obtain an outputmessage template corresponding to the artifact that is likely present inthe brainwave data, and generate an output indicative of a quality ofthe brainwave data based on the output message template corresponding tothe artifact that is likely present in the brainwave data.

According to some implementations, a non-transitory computer-readablestorage medium includes instructions, which when executed by one or morecomputers, cause the one or more computers to execute operations. Theoperations include: obtaining brainwave data from a wearable devicecomprising brainwave sensors and determining that an artifact is likelypresent in the brainwave data by performing one or more of line noisesignal to noise ratio (SNR)-based determination, a mutual informationdetermination, and a p-welch method. The operations also includeobtaining an output message template corresponding to the artifact thatis likely present in the brainwave data, and generating an outputindicative of a quality of the brainwave data based on the outputmessage template corresponding to the artifact that is likely present inthe brainwave data.

Other aspects include corresponding methods, systems, apparatus,computer-readable storage media, and computer programs configured toimplement the operations of the above-noted methods.

The details of one or more implementations of the subject matter of thisdisclosure are set forth in the accompanying drawings and thedescription below. Other features, aspects, and advantages of thesubject matter will become apparent from the description, the drawings,and the claims.

DESCRIPTION OF DRAWINGS

FIG. 1 depicts block diagram of an example system for obtainingbrainwave data in accordance with implementations of the presentdisclosure.

FIG. 2 depicts an example of a wearable device used to obtain brainwavedata according to implementations of the present disclosure.

FIGS. 3A-3C depict example brainwave data signals according toimplementations of the present disclosure.

FIGS. 4A-4C depicts examples of training data used for modelingartifacts according to implementations of the present disclosure.

FIG. 5 depicts a flowchart of an example process for providing anindication of the presence of artifacts in brainwave data according toimplementations of the present disclosure.

FIG. 6A depicts a power spectrum of EEG data according toimplementations of the present disclosure.

FIG. 6B depicts a slope fitted to the logged power spectrum of EEG dataaccording to implementations of the present disclosure.

FIG. 7 depicts a schematic diagram of a computer system that can beapplied to any of the computer-implemented methods and other techniquesdescribed herein.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

EEG systems provide insight into the neural activity of a patient'smental health. In particular, wave patterns recorded through EEG systemscan provide characteristic data of mental states such as anxiety,stress, excitement, or depression.

However, obtaining reliable EEG data is difficult. Technicians or usersgenerally have to be trained for several years to use an EEG system tocollect, analyze, and interpret EEG data. Furthermore, collected EEGdata is susceptible to errors arising from various sources such aspatient noise, environmental noise, or cap noise.

Patient noise includes noise that is generated as a result of patientmovement, such as blinking, moving body parts, grinding teeth, orsniffing. Environmental noise includes noise that is generated byinterferences in the surroundings of a patient. Examples ofenvironmental noise include interferences due to electromagnetic signalssuch as a cell phone signal, electrical appliances such as microwaves orrefrigerators being plugged into a socket and drawing a certain amountof power, or a powerful magnet being placed near a patient. Cap noisecan be generated when an EEG cap placed on a patient's head has one ormore sensors that have poor contact with a patient's scalp. In thisdisclosure, a patient refers to the person whose brainwave or EEG datais being obtained.

Identifying and removing the above-noted sources of errors from EEG datahas been difficult. Furthermore, no real time mechanism is widelyavailable to compensate for these errors or to provide guidance totechnicians to modify the test setup (e.g., to adjust the placement ofthe cap on a patient for better contact) to obtain better EEG data. As aresult, technicians often realize that the EEG data obtained for apatient contained several errors after the data is processed andanalyzed, which could be hours or days later. Consequently, tests haveto be repeated with the hope that new EEG data does not contain the sameerrors. Such a scenario is undesirable for technicians as well aspatients due to the inefficiencies and delays in obtaining accurate EEGdata.

Disclosure in this specification describes several advantages thatprovide a solution to the above-noted problems. As described in furtherdetail below, measurements obtained from an EEG system can be processedto identify artifacts. The artifacts can be identified using one or moreof a signal to noise ratio (SNR)-based method for detecting line noise,a mutual information-based method, and a P-welch method. The likelysource of error is determined based on the identified artifacts. Areal-time output is then generated that provides guidance to atechnician on whether the measurements are satisfactory or ifadjustments should be made based on the likely source of error. In somecases, the output can also include a recommendation for action toimprove the EEG measurements.

To identify the artifacts, machine learning techniques and neuralnetworks can be used in conjunction with training data to create modelsfor the artifacts, e.g., patient noise, environmental noise, and capnoise. The training datasets can include datasets with known artifacts.For example, numerous timed samples of EEG data affected with noise fromsurrounding electrical appliances, such as a refrigerator or microwave,can be obtained and contrasted with timed samples of clean EEG dataunaffected by environmental noise or other types of artifacts todetermine how EEG datasets with environmental noise arising fromappliances can be modeled. Other datasets can similarly be used tocreate models for other artifacts.

Hereinafter, example implementations of the methods and systems forobtaining improved EEG data by minimizing the effect of artifacts aredescribed.

FIG. 1 depicts a block diagram of an example system 100 for obtainingEEG data in accordance with implementations of the present disclosure.The system includes a brainwave data processor 102 which is configuredto communicate with brainwave sensors 104 in a brainwave sensor system105 such as an EEG cap. The data processor 102 can be implemented as ahardware or a software module. For example, the data processor 102 canbe a hardware or software module that is incorporated into a computingsystem such as a brainwave monitoring system, a desktop or laptopcomputer, or a wearable device. The data processor 102 is configured toreceive brainwave data of a patient from the brainwave sensors 104. Insome implementations, additional sensors can be used to obtain datarelated to other physiological actions of the patient such as bodymovements.

Brainwave sensors 104 are configured to obtain raw EEG data in the formof brainwave data. User physiological actions such as muscular movements(e.g., in the face, head, and eyes), heartbeats, and respiration cancreate noise in the brainwave signals received by brainwave sensors 104.This noise can be generated due to one or more electrical signals of aperson's body (e.g., nervous system impulses to control musclemovements) that interfere with the brainwave data, other brain signalsfor controlling such physiological actions, or both.

In general, various suitable types of sensors can be used as brainwavesensors 104. In some implementations, the brainwave sensors 104 can beone or more individual electrodes (e.g., multiple EEG electrodes) thatare connected to the data processor 102 by wired or wirelessconnections. The brainwave sensors 104 can be part of a brainwave sensorsystem 105, such as an EEG cap, that is in communication with the dataprocessor 102. A brainwave sensor system 105 can include multipleindividual brainwave sensors 104 and computer hardware (e.g., processorsand memory) to receive, process, and/or display data received from thebrainwave sensors 104. Example brainwave sensor systems 105 can include,but are not limited to, EEG systems, a wearable brainwave detectiondevice (e.g., as described below in reference to FIG. 2 below), amagnetoencephalography (MEG) system, and an Event-Related Optical Signal(EROS) system, sometimes also referred to as “Fast N IRS” (Near Infraredspectroscopy).

FIG. 2 depicts an example brainwave sensor system 105. In someimplementations, the brainwave sensor system 105 may be a wearabledevice 200 which includes a pair of bands 202 that fit over a patient'shead. The wearable device 200 includes one band which fits over thefront of a patient's head and the other band 202 which fits over theback of a patient's head, securing the device 200 sufficiently to thepatient during operation. The bands 202 include a plurality of brainwavesensors 104. The sensors 104 can be, for example, electrodes configuredto sense the patient's brainwaves through the skin. For example, theelectrodes can be non-invasive and configured to contact the patient'sscalp and sense the patient's brainwaves through the scalp. In someimplementations, the electrodes can be secured to the patient's scalp byan adhesive.

The sensors 104 are distributed across the rear side 204 of each band202 or the side facing the patient. In some examples, the sensors 104can be distributed across the bands 202 to form a comb-like structure.For example, the sensors 104 can be narrow pins distributed across thebands 202 such that a patient can slide the bands 202 over the patient'shead allowing the sensors 104 to slide through the patient's hair, likea comb, and contact the patient's scalp. Furthermore, the sensors 104distributed on the bands 202 can enable the device 200 to be retained inplace on the patient's head by the patient's hair. In someimplementations, the sensors 104 are retractable. For example, thesensors 104 can be retracted into the body of the bands 202.

The wearable device 200 is in communication with a computing device 118,e.g., a laptop, tablet computer, desktop computer, smartphone, orbrainwave data processing system. For example, the data processor 102can be implemented as a software application on a computing device 118.The wearable device 200 communicates brainwave data received from thesensors 104 to the computing device 118. In some implementations, thedata processor 102 can be implemented on the wearable device 200. Insuch implementations, the device 200 can communicate brainwave data tothe computing device 118 for use by other applications on the computingdevice, e.g., medical applications, brainwave monitoring applications,research applications.

A simulated example of brainwave data that can be received from onebrainwave sensor is shown in FIG. 3A. The signal in FIG. 3A representsan aggregate electrical signal that can include multiple signal patternsrelated to environmental noise, patient noise, environmental noise,and/or cap noise and brainwave patterns related to mental activities ofthe patient. Examples of patient actions that give rise to participantnoise include, but are not limited to, head movements, movements offacial muscles, a pulse rate (e.g., heartbeat), eye movements,respiration, or a combination thereof.

As described in more detail below, the EEG system may generate one ormore recommendations for the technician to improve the EEG data shown inFIG. 3A. The time domain and frequency domain signals shown in FIGS. 3Band 3C are obtained after a technician takes one or more stepsrecommended by the EEG system to remove the sources of noise, e.g., byasking the patient to stop making head or facial movements or rechecking(and adjusting as needed) contact of sensors in the wearable brainwavedetection device with a patient's scalp. The signal in FIG. 3A can becontrasted with the signal shown in FIG. 3B, which depicts the brainwavepattern without the participant noise i.e., a clean EEG signalassociated with the patient.

Referring back to FIG. 1 , the data processor 102 can include or becoupled to I/O Systems 112, one or more neural networks 114, an artifactclassifier 116, and storage 108, each of which can be implemented usinga combination of hardware and software. Storage 108 can be locatedremotely from the data processor 102 or integrated with the device onwhich the data processor 102 is implemented, e.g., in a computer orserver.

The I/O Systems 112 can include input and output units that areconfigured to receive data from other systems and components and providedata to other systems and devices. For example, I/O Systems 112 caninclude input devices such as a keyboard, a pointing device, a mouse, astylus, and/or a touch sensitive panel, e.g., a touch pad or a touchscreen. The input devices may be any suitable device capable ofreceiving information through any type of medium, e.g., microphones foraudio data, optical cameras for video data, etc. Output devices mayinclude displays, screens, speakers, and, in general, any device thatcan output digital data through various media.

I/O Systems 112 can also include a transceiver that includes atransmitter and a receiver, and can be utilized to communicate with aserver. The transceiver can include amplifiers, modulators,demodulators, antennas, and various other components. The transceivercan transfer or route data between the processor and other systems andcomponents. For example, the transceiver can include a communicationinterface configured to transmit data between the data processor 102 andother systems and components such as storage 108, brainwave sensors 104,and/or computing devices 118.

The I/O Systems 112 can include a wired communication (e.g., USB,Ethernet) or wireless I/O Systems (e.g., Bluetooth, ZigBee, WiFi). TheI/O Systems 112 can be used to communicate directly or indirectly, e.g.,through a network, with other remote computing devices 118 such as,e.g., a laptop, a tablet computer, a smartphone, etc.

Storage 108 can be implemented using various types of memory systems asdescribed below with reference to FIG. 7 . For example, storage 108 canbe implemented as one or more mass storage devices, for example,magnetic, magneto optical disks, optical disks, EPROM, EEPROM, flashmemory devices, and can be implemented as internal hard disks, removabledisks, magneto optical disks, CD ROM, or DVD-ROM disks for storing data.

In some implementations, storage 108 can store computer programs andcode used by the processor 102 for executing operations such as codethat facilitates receiving brainwave data and extracting artifacts forfrom the received brainwave data.

In some implementations, the storage 108 can also store one or moretraining data sets. The data sets can include data associated signalcharacteristics/EEG data representative of different types of artifactsas well as data sets that include signal characteristics/EEG datalacking artifacts. For example, storage 108 can store a participantnoise dataset, an environmental noise dataset, a cap noise data set, anda clean EEG dataset. Training data can be updated periodically or eachtime measurements are obtained using brainwave sensor system 105. In thelatter case, newly obtained measurements can be processed as describedbelow to identify artifacts present in the obtained EEG data. Theobtained measurements or data derived from the obtained measurements canthen be added to a dataset of the artifact identified as being presentin the obtained measurements.

Examples of training data are depicted in FIGS. 4A-4C. FIGS. 4A-4C showbrainwave data obtained by 4 different sensors in brainwave sensorsystem. For example, the periodic high frequency bursts shown in FIG. 4Aare examples of participant noise dataset. In the illustrated example,FIG. 4A depicts a common artifact originating from the bilateralmasseters, which occurs when a patient is grinding teeth together. Thus,line 410 can be selected as training data for an artifact associatedwith a participant noise dataset, and more particularly, with a patientgrinding teeth.

FIG. 4B depicts an example in which each of the sensors picks updifferent data. In particular, signal pattern 420 is corrupted with a 60Hz noise artifact. Thus, signal pattern 420 can be selected as trainingdata for an artifact associated with an environmental noise. FIG. 4Cdepicts an example in which the recorded signals across all electrodesare similar, indicating that all the electrodes are picking up someartifact. Similar signals across all electrodes can be attributed to EEGelectrodes being misplaced, e.g., if an electrode is sitting on top apatient's hair and is not in direct contact with the patient's scalp.Thus, the mutual information between sensor pairs can be selected astraining data for an artifact associated with a cap noise data set, andmore particularly, with an electrode being misplaced.

While this specification describes artifacts such as participant noise,environmental noise, and cap noise, the methods and systems describedherein are not limited to these three artifacts. For example, datasetsfor other types of artifacts can be stored in storage 108 and used byprocessor 102 for training purposes or to identify correspondingartifacts in EEG data obtained from a patient. In addition, datasets fortraining data can be of varying length. For example, the datasets mayhave signal data spanning a period of time, e.g., 2 seconds, 5 seconds,10 seconds, 30 seconds, or a minute.

In some implementations, storage 108 can also include a mapping table.The mapping table can include one or more records of a database andarrange the records using data fields. For example, in someimplementations, a particular data field includes information on variousartifact types and another data field that includes records associatedwith output message templates. The mapping table can correlate one ormore output message templates listed in an output message template datafield to a type of artifact listed in an artifact data field. Forinstance, the mapping table stores data that maps each of a participantnoise artifact, an environmental noise artifact, and a cap noiseartifact to an output message template.

As an example, an output message template for an environmental noiseartifact can include instructions for the technician to check theenvironment for interfering devices such as cell phones or microwaves.An output message template for a participant noise artifact can includeinstructions for the technician to ask the patient to reduce moving,grinding teeth, or breathing less heavily. An output message templatefor a cap noise artifact can include instructions for the technician tocheck the contact between an electrode and the scalp of a patient.

In some implementations, processor 102 can transmit a request for anoutput message template corresponding to a particular type of artifact,e.g., a participant-based artifact, environmental artifact, and acap-based artifact, to the mapping table. The mapping table can processthe request by identifying the output message template mapped to theparticular type of artifact in the mapping table, and transmit themapped output message template

In some implementations, output message templates can be customized forcertain types of movements and can be correlated to particular artifactsin the mapping table. For instance, an output message template mapped toan artifact associated with the specific type of body movement (e.g.,movement of the arm or grinding of teeth) can include instructions forthe technician to request the patient to stop moving the part of thebody (e.g., arm, teeth) causing the artifact to be present in the EEGdata.

In another example, an output message template mapped to cap noiseartifacts can include instructions for the technician to check the EEGcap and make sure the electrodes in the EEG cap have good contact withthe patient's scalp. In some cases, if EEG data is obtained from aparticular sensor, the output message template can include a data fieldthat can be filled with an identification of the particular sensor sothat a message that is output includes an identification of theparticular sensor that does not have good contact with the patient'sscalp.

In some implementations, the one or more neural networks 114 can use thetraining data stored in storage 108 and machine learning models to trainthe artifact classifier 116 to identify artifacts present in brainwavedata obtained from a patient. For example, the one or more neuralnetworks 114 can include a machine learning model that has been trainedto receive model inputs, e.g., artifact-free signal patterns, and togenerate a predicted output, e.g., signal patterns associated withparticular types of brainwave data in which the effects of such signalpatterns are reduced or removed from the brainwave data.

In some implementations, instructions or code for implementing the oneor more neural networks 114 can be stored in storage 108 and executableby processor 102. In some implementations, the one or more neuralnetworks 114 can be implemented as a combination of hardware andsoftware, and can provide or receive data to or from the processor 102.For instance, the processor 102 can provide training data to the one ormore neural networks 114. In some cases, the processor 102 can transmitbrainwave data to the one or more neural networks 114. In response, theone or more neural networks 114 can provide data indicative of one ormore artifacts or corrective steps corresponding to the brainwave data.

In some implementations, the one or more neural networks 114 can includea deep learning neural network. The deep learning neural network is amachine learning model that employs multiple layers of models togenerate an output for a received input. The deep neural network is adeep machine learning model that includes an output layer and one ormore hidden layers that each apply a non-linear transformation to areceived input to generate an output. In some cases, the neural networkcan be a recurrent neural network. A recurrent neural network is aneural network that receives an input sequence and generates an outputsequence from the input sequence. In particular, a recurrent neuralnetwork uses some or all of the internal state of the network afterprocessing a previous input in the input sequence to generate an outputfrom the current input in the input sequence. In some otherimplementations, the machine learning model is a shallow machinelearning model, e.g., a linear regression model or a generalized linearmodel.

The machine learning model can be a feed forward auto encoder neuralnetwork. For example, the machine learning model can be a three-layerauto encoder neural network. The machine learning model can include aninput layer, a hidden layer, and an output layer. In someimplementations, the neural network has no recurrent connections betweenlayers. Each layer of the neural network can be fully connected to thenext, e.g., there may be no pruning between the layers. The neuralnetwork can include an ADAM optimizer for training the network andcomputing updated layer weights. In some implementations, the neuralnetwork can apply a mathematical transformation, e.g., convolution, toinput data prior to feeding the input data to the network.

In some implementations, the machine learning model can be a supervisedmodel. For example, for each input provided to the model duringtraining, the machine learning model can be instructed as to what thecorrect output should be. The machine learning model can use batchtraining, e.g., training on a subset of examples before each adjustment,instead of the entire available set of examples. This may improve theefficiency of training the model and may improve the generalizability ofthe model. The machine learning model can use folded cross-validation.For example, some fraction (the “fold”) of the data available fortraining can be left out of training and used in a later testing phaseto confirm how well the model generalizes.

For example, a machine learning model can be trained to recognize signalpatterns in brainwave data that include or exclude artifacts. Themachine learning model can correlate identified participant noise,environmental noise, and/or cap noise with signal patterns within thebrainwave data that are related to these artifacts.

In some implementations, the machine learning model can refine theability to identify signal patterns associated with artifacts for aparticular user. For example, the machine learning model can continue tobe trained on user specific data in order to adapt the signal patternrecognition algorithms to those associated with a particular patient.For example, the machine learning model can use brainwave data fromperiods of time during which the patient does not perform anyphysiological actions, e.g., during periods of time when the patient issubstantially motionless. The machine learning model can use such datato develop a baseline for the patient's brainwave data absent noise andinterference signal from other (non-brain related) physiologicalactivity. The machine learning model can compare such baseline brainwavedata to brainwave data with noise/interference signals due to one ormore other patient actions to more accurately identify the effects ofthe various different types of noise on the brainwave data.

In some implementations, the data processor 102 can include an artifactclassifier 116. The artifact classifier 116 can be trained using the oneor more neural networks 114 and machine. The artifact classifier 116 isconfigured to process the data obtained via the I/O systems 112 frombrainwave sensor system 105 by executing one or more operations thatinclude determining line noise signal to noise ratio, calculating mutualinformation between sensor pairs, and applying the p-welch method. Thesethree techniques are described in more detail below with respect to FIG.5 . As a result of executing these techniques, the artifact classifier116 can obtain an indication of whether or not the brainwave dataobtained from brainwave sensor system 105 contains any artifacts. Theartifact classifier 116 can then use the artifact indication andconfidence thresholds associated with a particular type of artifact todetermine whether the brainwave data includes the particular type ofartifact.

Processor 102 can communicate with the storage 108 to obtain outputmessages that are mapped to a particular type of artifact. The outputmessages can then be output to a technician through I/O systems 112. Forexample, if the artifact classifier 116 determines that obtainedbrainwave data includes an artifact corresponding to participant noise,the processor 102 will obtain a message that corresponds to theparticipant noise template from storage 108. I/O systems 112 can thenoutput the message is through any suitable medium, such as a displaydevice and/or a speaker.

FIG. 5 depicts a flowchart of an example process for providing anindication of the presence of artifacts in brainwave or EEG data. Insome implementations, the process 500 can be performed by one or morecomputer-executable programs executed using one or more computingdevices. In some examples, the process 500 is executed by an EEGmeasurement system implemented at the data processor 102 of FIG. 1 , ora computing device such as computing device 118 or wearable device 200.

The process 500 can be initiated by obtaining EEG data from one or morebrainwave sensors (502). To do this, a wearable device, such as wearabledevice 200, is placed on a patient's head, as depicted and describedwith respect to FIG. 2 . The wearable device is connected through awired or wireless connection to a computing device, such as computingdevice 118. The computing device includes a data processor that obtainsEEG data transmitted from the brainwave sensors.

EEG data can include data of a voltage signal indicative of thepatient's brainwave activity over a particular period of time. This timeperiod may be any suitable time period set by the technician.

EEG or brainwave activity data can include brainwaves that are relatedto the mental activity of a user, e.g., Alpha brainwaves, Gammabrainwaves, Beta brainwaves, Delta brainwaves, and Theta brainwaves.Alpha brainwaves are associated with lapses in attention and sleepiness.Gamma brainwaves are associated with cognitive activity, such as mentalcalculation. Beta brainwaves may be associated with alertness or anxiousthinking. Delta brainwaves are characteristic of slow wave sleep. Thetabrainwave phase may be associated with the commission of a cognitiveerror and theta activity is greater during high levels of alertness toauditory stimulation.

As described above, EEG data can include aggregated electrical signalsthat represent signal patterns related to the mental activity of thepatient that may or may not have been compromised by patient noise,environmental noise, and/or cap noise. For example, user muscularmovements (e.g., in the face, head, and eyes), heartbeats, andrespiration create noise in the brainwave signals received by brainwavesensors 104. The noise can also be due to other electrical signals inthe body (e.g., nervous system impulses to control muscle movements),other brain signals for controlling such movements, or both. A signalpattern related to physical movements of the user may be interpreted asnoise with respect to the signal pattern related to the mental activityof the user, or vice versa depending on which signal pattern is desiredfor analysis.

In addition to patient noise, cap noise can be generated when one ormore sensors in a wearable device or EEG cap have poor contact with apatient's scalp or are not operating properly. Environmental noise canbe generated as a result of electromagnetic interferences that exist inthe environment such as a cell phone signal or electrical hummingresulting from a high powered electromagnetic device being operatedwithin a certain distance of the patient. Line noise generated as aresult of electrical appliances such as microwaves or refrigeratorsbeing plugged into a socket can also contribute to environmental noise.

The obtained EEG data can be preprocessed for subsequent dataprocessing. In general, various suitable types of preprocessing can beimplemented. For example, the EEG data can be filtered, downsampled,and/or converted to frequency domain data using techniques such as FastFourier Transform or a Welch periodogram. The obtained EEG data can beseparated such that EEG data in response to specific events can beprocessed and stored. In some cases, the EEG data from multiplebrainwave sensors can be aggregated and processed.

After obtaining and optionally preprocessing the EEG data, the dataprocessor executes one or more methods to identify a presence ofartifacts in the EEG data (504). Artifacts in EEG data can be identifiedusing several techniques including line noise signal-to-noise ratio(SNR), mutual sensor pair information, the p-welch method, or acombination thereof.

Line Noise SNR

As noted above, EEG data obtained from the brainwave sensors can beconverted from time domain to frequency domain. A power spectrum of thefrequency domain data can then be generated. Electrical noise of the EEGdata can be recognized by determining the signal to noise ratio acrossthe power spectrum. A spike or peak in the SNR at a frequency associatedwith one or more of a utility line frequency, power line frequency, andan alternating current frequency, e.g., 60 Hz in a local power line inthe US, is generally indicative of excessive electrical noise orinterference in the environment, which can be mediated by minimizing thenoise from nearby electrical devices. An example of such a 60 Hz spikeis illustrated in FIG. 6A. Thus, if the SNR of EEG data obtained from asensor has a 60 Hz peak, as shown in FIG. 6A, the obtained EEG is likelyaffected by environmental or electrical noise.

In more detail, conversion of the EEG data to frequency domain data canbe achieved by using Fast Fourier Transform (FFT), Discrete FourierTransform (DFT), the p-Welch method, or other conversion methods. Fromthe raw frequency domain data, a power spectrum of the SNR derived fromthe EEG data can be generated. In some cases, a bandpass filter can beapplied to narrow the analysis of the power spectrum to a region with acenter frequency of 60 Hz, e.g., a region of 50 Hz to 70 Hz.

A peak detection algorithm can be used to determine whether a peakexists at 60 Hz, or more generally with a frequency associated with oneor more of a utility line frequency, power line frequency, and analternating current frequency. For example, in some cases, a comparatorcan be used to determine if the SNR at 60 Hz is greater than or lessthan a particular SNR threshold. If the signal power is greater than orequal to the particular SNR threshold, the data processor determinesthat a SNR peak exists at 60 Hz and generates an output signalindicating the likely presence of a 60 Hz line noise artifact. If theSNR value at 60 Hz is less than the particular SNR threshold, the dataprocessor determines that significant line noise to interfere with goodquality EEG data does not exist, and generates an output signalindicating that the EEG data is likely not affected by 60 Hz line noise.The SNR threshold can be set or adjusted by the technician or author ofthe algorithm. The data processor can execute the peak detectionalgorithm, e.g., code for implementing the compactor to detect a 60 Hzpeak.

Mutual Sensor Pair Information

The data processor can also determine mutual information between twosensors to determine the presence of an artifact due to cap noise. Inparticular, if each electrode in a wearable device is treated as arandom variable, true biological data would have a moderate amount ofshared dependence between those variables. Mutual information can bedetermined for any two sensors in the wearable device, and is a measureof uncertainty. The mutual information between the two sensors can bedetermined by Equation (1) below.

$\begin{matrix}{{{I( {X;Y} )} = {\sum\limits_{y \in \mathcal{Y}}{\sum\limits_{x \in \mathcal{X}}{{p( {x,y} )}\log( \frac{p( {x,y} )}{{p(x)}{p(y)}} )}}}},} & (1)\end{matrix}$

In Equation (1), p(x) refers to the marginal probability distributionfunction associated with a first sensor, p(y) refers to the marginalprobability distribution function associated with a second sensor, andp(x, y) refers to the joint probability function associated with thesensor pair including the first and second sensors.

In general, the higher the value of the mutual information, the largerthe uncertainty. Thus, a value closer to one indicates a greaterlikelihood of the presence of an artifact present across all EEGsensors, such as electrical bridging of nearby sensor pairs. In general,if the mutual information is greater than or equal to a particularthreshold value, the system can determine that an artifact is present inthe EEG data. The particular threshold value can be set by thetechnician or manufacturer of the wearable device.

In more detail, when a wearable device is connected to the dataprocessor, the data processor may identify each sensor in the wearabledevice and maintain separate records for each sensor. For example, EEGdata obtained from each sensor may be stored in different memorylocations. Accordingly, EEG data can be obtained and correlated tospecific sensors.

The data processor can then determine the various combinations of sensorpairs in the wearable device and determine the mutual information forone or more of the sensor pairs in the wearable device. In some cases,if the mutual information is greater than or equal to a particularmutual information threshold value, the data processor determines thatan artifact is present in the EEG data and generates an output signalindicating the likely presence of a cap noise artifact. If the mutualinformation is less than the particular mutual information thresholdvalue, the data processor determines that an artifact is not present inthe EEG data and generates an output signal indicating that a cap noiseartifact likely is not present.

P-Welch Method

Like the SNR method, in the P-welch method, EEG data obtained from thebrainwave sensors can be converted from time domain to frequency domain.A power spectrum of the frequency domain data is generated and logged.Next, a first degree polynomial is fitted to the logged power spectrumand a slope of the polynomial is determined, as shown in FIG. 6B.

In general, when EEG data contains no artifacts, the logged powerspectrum has a shape consistent with a 1/f spectral distributionpattern. Thus, if the slope is a poor fit to the 1/f spectraldistribution pattern, the EEG data likely contains artifacts.Furthermore, the shape of the power spectrum data can also provideinsight into the type of noise. For instance, white noise is a randomsignal having equal intensity at different frequencies, giving it aconstant power spectral density, and would result in a flat frequencydistribution, indicating an error. More broadly, any non 1/f frequencydistribution is suggestive of some sort of abnormality in the data.

In some implementations, after applying one or more of the line noisesignal-to-noise ratio (SNR), mutual sensor pair information, and thep-welch method (collectively referred to as “artifacts tests”) to theEEG data, a likely noise artifact can be determined by comparing theresults of the artifacts tests to models that have been generated usingan artifact classifier as described above (506).

For example, a peak detected at 60 Hz when determining Line Noise SNRmay generally indicate the presence of electrical interference with thebrainwave or EEG measurements. However, additional models can be used tosupplement this analysis to determine the particular type of electricalinterference. For instance, power spectrum envelopes or the amplitudevalues of the 60 Hz peak may correspond to particular types of noise.

As an example, a model for cell phone interference may indicate aparticular range of amplitude values at higher frequencies (e.g., 700MHz to 2.5 GHz) that is different from the range of amplitude values forthe 60 Hz peak in a model for line-based interference arising from,e.g., when a microwave or refrigerator near the patient is turned on.Additionally, the power spectrum envelope associated with EEG dataaffected by cell phone interference may be different from a powerspectrum envelope associated with EEG data affected by line-basedinterference.

By comparing the power spectrum envelope and/or amplitude values at 60Hz of the obtained EEG data to these models, the EEG measurement systemcan determine the likely noise artifact in an EEG measurement. In thecurrent example, the EEG measurement system can determine that EEG dataincludes an environmental artifact that is, e.g., likely a line-basedartifact if the 60 Hz amplitude values and/or power spectrum envelop ofthe EEG data corresponds to the 60 Hz amplitude values and/or powerspectrum envelop in a line noise model.

For the p-welch method, certain slopes may be associated with aparticular type of artifact. Thus, if the slope of obtained EEG datacorresponds to a slope in a model for a particular artifact, the EEGmeasurement system can determine that the obtained EEG data likely isaffected by noise associated with the particular type of artifact.

For Mutual Sensor Pair Information artifact tests, certain values of themutual information I(X,Y) may indicate the likely presence of aparticular type of artifact. For example, a particular range of valuescan indicate that one of the sensors does not have good contact with apatient's scalp. A second range of values can indicate that both sensorsdo not have good contact with a patient's scalp.

In general, various types of models can be used in conjunction with theartifact tests to determine the presence of an artifact in brainwave orEEG data, and, in some cases, a particular type of artifact present inthe brainwave or EEG data.

In some implementations, when comparing the results of the artifactstests to models that have been generated using training data and neuralnetworks, a similarity threshold can be used. A result of an artifacttests is determined to be similar to a model if the similarity betweenthe result of the artifact test and the model is greater than or equalto the similarity threshold.

After the determination is made, the EEG measurement system can generatean output indicative of a quality of the obtained EEG data (508). Forexample, in some cases, a binary output system can be used in which afirst signal is generated if the obtained EEG data likely does notcontain any artifacts, and a second signal is generated if the obtainedEEG data likely does contain artifacts. These first and second signalcan be implemented in various formats such as light signals, audiosignals, or other representative forms. For instance, a green light canbe output if the obtained EEG data likely does not contain anyartifacts. A red light can be output if the EEG data likely does containan artifact.

In some cases, an audio message such as “[T]his EEG measurement does notcontain any artifacts” can be output if the obtained EEG data likelydoes not contain any artifacts. An audio message such as “[T]his EEGmeasurement contains at least one artifact” can be output if the EEGdata likely does contain an artifact. In general, various suitable typesof signals and indicators can be used to indicate the presence or lackof indicators in obtained EEG data.

In some implementations, if a particular type of artifact is determinedto be likely present, the EEG measurement system can output a messageassociated with the particular type of artifact. In particular, if theEEG measurement system determines that obtained EEG data likely containsa particular type of artifact, the EEG measurement system can transmit arequest to the mapping table described above for an output messagetemplate associated with particular type of artifact. After receivingthe request, the mapping table can look up the output message templateassociated with the particular type of artifact, and can transmit theoutput message template to the EEG measurement system. After receivingthe output message template from the mapping table, the EEG measurementsystem can generate an output using the output message template. Theoutput can be generated in various formats and using any suitablemethod.

As another example, if the EEG measurement system determines thatobtained EEG data likely includes an artifact due to the patientgrinding teeth, the EEG measurement system can transmit a request for anoutput message template associated with a patient grinding teeth to themapping table. After receiving the output message template from themapping table, the EEG measurement system can then output a message tothe technician or patient indicating that the obtained EEG data includesparticipant noise. In some cases, the output template may include arecommendation for minimizing participant noise. For example, the EEGmeasurement system can generate a message such as “Please request thepatient to stop grinding teeth.”

In another example, when a mutual sensor pair information test isperformed and data from a particular pair of sensors is determined tolikely include a cap noise artifact, the EEG measurement system cantransmit a request for an output message template associated with a capnoise error. The template can include a field for an identification ofeach of the sensors (e.g., sensors A and B) in the sensor pair beingtested. After receiving the output message template from the mappingtable, the EEG measurement system can generate a message such as “Pleasedouble check the contact between the patient and sensors A and B.”

FIG. 7 is a schematic diagram of a computer system 700. The system 700can be used to carry out the operations described in association withany of the computer-implemented methods described previously, accordingto some implementations. In some implementations, computing systems anddevices and the functional operations described in this specificationcan be implemented in digital electronic circuitry, in tangibly-embodiedcomputer software or firmware, in computer hardware, including thestructures disclosed in this specification (e.g., system 700) and theirstructural equivalents, or in combinations of one or more of them. Thesystem 700 is intended to include various forms of digital computers,such as laptops, desktops, workstations, personal digital assistants,servers, blade servers, mainframes, and other appropriate computers,including vehicles installed on base units or pod units of modularvehicles. The system 700 can also include mobile devices, such aspersonal digital assistants, cellular telephones, smartphones, and othersimilar computing devices. Additionally, the system can include portablestorage media, such as, Universal Serial Bus (USB) flash drives. Forexample, the USB flash drives can store operating systems and otherapplications. The USB flash drives can include input/output components,such as a wireless transducer or USB connector that can be inserted intoa USB port of another computing device.

The system 700 includes a processor 710, a memory 720, a storage device730, and an input/output device 740. Each of the components 710, 720,730, and 740 are interconnected using a system bus 550. The processor710 is capable of processing instructions for execution within thesystem 700. The processor can be designed using any of a number ofarchitectures. For example, the processor 710 may be a CISC (ComplexInstruction Set Computers) processor, a RISC (Reduced Instruction SetComputer) processor, or a MISC (Minimal Instruction Set Computer)processor.

In one implementation, the processor 710 is a single-threaded processor.In another implementation, the processor 710 is a multi-threadedprocessor. The processor 710 is capable of processing instructionsstored in the memory 720 or on the storage device 730 to displaygraphical information for a user interface on the input/output device740.

The memory 720 stores information within the system 700. In oneimplementation, the memory 720 is a computer-readable medium. In oneimplementation, the memory 720 is a volatile memory unit. In anotherimplementation, the memory 720 is a non-volatile memory unit.

The storage device 730 is capable of providing mass storage for thesystem 700. In one implementation, the storage device 730 is acomputer-readable medium. In various different implementations, thestorage device 730 may be a floppy disk device, a hard disk device, anoptical disk device, or a tape device.

The input/output device 740 provides input/output operations for thesystem 700. In one implementation, the input/output device 740 caninclude or be coupled to a keyboard and/or pointing device. In anotherimplementation, the input/output device 740 can include or be coupled toa display unit for displaying graphical user interfaces.

The features described can be implemented in digital electroniccircuitry, or in computer hardware, firmware, software, or incombinations of them. The apparatus can be implemented in a computerprogram product tangibly embodied in an information carrier, e.g., in amachine-readable storage device for execution by a programmableprocessor; and method steps can be performed by a programmable processorexecuting a program of instructions to perform functions of thedescribed implementations by operating on input data and generatingoutput. The described features can be implemented advantageously in oneor more computer programs that are executable on a programmable systemincluding at least one programmable processor coupled to receive dataand instructions from, and to transmit data and instructions to, a datastorage system, at least one input device, and at least one outputdevice. A computer program is a set of instructions that can be used,directly or indirectly, in a computer to perform a certain activity orbring about a certain result. A computer program can be written in anyform of programming language, including compiled or interpretedlanguages, and it can be deployed in any form, including as astand-alone program or as a module, component, subroutine, or other unitsuitable for use in a computing environment.

Suitable processors for the execution of a program of instructionsinclude, by way of example, both general and special purposemicroprocessors, and the sole processor or one of multiple processors ofany kind of computer. Generally, a processor will receive instructionsand data from a read-only memory or a random access memory or both. Theessential elements of a computer are a processor for executinginstructions and one or more memories for storing instructions and data.Generally, a computer will also include, or be operatively coupled tocommunicate with, one or more mass storage devices for storing datafiles; such devices include magnetic disks, such as internal hard disksand removable disks; magneto-optical disks; and optical disks. Storagedevices suitable for tangibly embodying computer program instructionsand data include all forms of non-volatile memory, including by way ofexample semiconductor memory devices, such as EPROM, EEPROM, and flashmemory devices; magnetic disks such as internal hard disks and removabledisks; magneto-optical disks; and CD-ROM and DVD-ROM disks. Theprocessor and the memory can be supplemented by, or incorporated in,ASICs (application-specific integrated circuits).

To provide for interaction with a technician or patient, the featurescan be implemented on a computer having a display device such as a CRT(cathode ray tube) or LCD (liquid crystal display) monitor fordisplaying information to the user and a keyboard and a pointing devicesuch as a mouse or a trackball by which the user can provide input tothe computer. Additionally, such activities can be implemented viatouchscreen flat-panel displays and other appropriate mechanisms.

The features can be implemented in a computer system that includes aback-end component, such as a data server, or that includes a middlewarecomponent, such as an application server or an Internet server, or thatincludes a front-end component, such as a client computer having agraphical user interface or an Internet browser, or any combination ofthem. The components of the system can be connected by any form ormedium of digital data communication such as a communication network.Examples of communication networks include a local area network (“LAN”),a wide area network (“WAN”), peer-to-peer networks (having ad-hoc orstatic members), grid computing infrastructures, and the Internet.

The computer system can include clients and servers. A client and serverare generally remote from each other and typically interact through anetwork, such as the described one. The relationship of client andserver arises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinventions or of what may be claimed, but rather as descriptions offeatures specific to particular implementations of particularinventions. Certain features that are described in this specification inthe context of separate implementations can also be implemented incombination in a single implementation. Conversely, various featuresthat are described in the context of a single implementation can also beimplemented in multiple implementations separately or in any suitablesubcombination. Moreover, although features may be described above asacting in certain combinations and even initially claimed as such, oneor more features from a claimed combination can in some cases be excisedfrom the combination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

It should be understood that the phrase one or more of and the phrase atleast one of include any combination of elements. For example, thephrase one or more of A and B includes A, B, or both A and B. Similarly,the phrase at least one of A and B includes A, B, or both A and B.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingcan be advantageous. Moreover, the separation of various systemcomponents in the implementations described above should not beunderstood as requiring such separation in all implementations, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

Thus, particular implementations of the subject matter have beendescribed. Other implementations are within the scope of the followingclaims. In some cases, the actions recited in the claims can beperformed in a different order and still achieve desirable results. Inaddition, the processes depicted in the accompanying figures do notnecessarily require the particular order shown, or sequential order, toachieve desirable results. In certain implementations, multitasking andparallel processing can be advantageous.

What is claimed is:
 1. A computer-implemented method executed by one ormore processors and comprising: obtaining brainwave data from a wearabledevice comprising brainwave sensors; determining that an artifact islikely present in the brainwave data by performing an artifact detectionprocess comprising a P-welch method, wherein performing the P-welchmethod comprises: generating frequency brainwave data from the brainwavedata obtained from the brainwave sensors; generating a power spectrum ofthe frequency brainwave data; applying a first degree polynomial to alogged representation of the power spectrum; and determining that aslope of the first degree polynomial or shape of the loggedrepresentation of the power spectrum corresponds to a slope or shapeassociated with an artifact; obtaining an output message templatecorresponding to the artifact that is likely present in the brainwavedata; and generating an output indicative of a quality of the brainwavedata based on the output message template corresponding to the artifactthat is likely present in the brainwave data.
 2. Thecomputer-implemented method of claim 1, wherein determining that anartifact is likely present in the brainwave data by performing anartifact detection process further comprises performing a line noisesignal to noise ratio (SNR)-based determination comprising: determininga signal to noise ratio across the power spectrum; and determining asignal to noise ratio peak at a predetermined frequency associated withone or more of a utility line frequency, power line frequency, and analternating current frequency.
 3. The computer-implemented method ofclaim 1, wherein determining that an artifact is likely present in thebrainwave data by performing an artifact detection process furthercomprises performing a mutual information determination comprising:determining a mutual information value between two sensors of thebrainwave sensors; and determining that the mutual information value isgreater than or equal to a threshold value.
 4. The computer-implementedmethod of claim 1, wherein determining that an artifact is likelypresent in the brainwave data comprises performing two or more of a linenoise signal to noise ratio (SNR)-based determination, a mutualinformation-based determination, and the P-welch method.
 5. Thecomputer-implemented method of claim 1, further comprising identifying,based on one or more features of the artifact, a type of the artifact asone or more of a participant-based artifact, environmental artifact, anda cap-based artifact in the brainwave data in response to determiningthat an artifact is likely present in the brainwave data.
 6. Thecomputer-implemented method of claim 5, wherein identifying the type ofthe artifact data as one or more of a participant-based artifact,environmental artifact, and a cap-based artifact comprises: obtainingartifact models from an artifact database; comparing the one or morefeatures of the artifact to the artifact models; determining that asimilarity between the one or more features of the artifact and one ofthe artifact models satisfies a similarity threshold; and determiningthat the brainwave data includes one or more of a participant-basedartifact, environmental artifact, and a cap-based artifact in responseto determining that the similarity threshold is satisfied.
 7. Thecomputer-implemented method of claim 6, wherein the artifact models aregenerated using a neural network and training data.
 8. Thecomputer-implemented method of claim 5, wherein obtaining the outputmessage template corresponding to the artifact that is likely present inthe brainwave data comprises: transmitting, to a mapping table database,a request for an output message template corresponding to the one ormore of a participant-based artifact, environmental artifact, and acap-based artifact identified in the brainwave data; and receiving, fromthe mapping table database, the output message template.
 9. Thecomputer-implemented method of claim 1, wherein the output messagetemplate includes one or more instructions that direct an EEG technicianto perform particular actions for reducing or eliminating the artifact.10. A system comprising: a wearable device comprising brainwave sensorsconfigured to obtain brainwave data; and a data processor communicablycoupled to the brainwave sensors, the data processor being configuredto: determine that an artifact is likely present in the brainwave databy performing an artifact detection process comprising a p-welch method,wherein performing the p-welch method comprises: generating frequencybrainwave data from the brainwave data obtained from the brainwavesensors; generating a power spectrum of the frequency brainwave data;applying a first degree polynomial to a logged representation of thepower spectrum; and determining that a slope of the first degreepolynomial or shape of the logged representation of the power spectrumcorresponds to a slope or shape associated with an artifact; obtain anoutput message template corresponding to the artifact that is likelypresent in the brainwave data; and generate an output indicative of aquality of the brainwave data based on the output message templatecorresponding to the artifact that is likely present in the brainwavedata.
 11. The system of claim 10, wherein the data processor beingconfigured to determine that an artifact is likely present in thebrainwave data comprises the data processor being configured to performtwo or more of a line noise signal to noise ratio (SNR)-baseddetermination, a mutual information-based determination, and the P-welchmethod.
 12. The system of claim 10, wherein the data processor isfurther configured to identify the artifact as one or more of aparticipant-based artifact, environmental artifact, and a cap-basedartifact in the brainwave data in response to determining that anartifact is likely present in the brainwave data.
 13. The system ofclaim 12, wherein the data processor being configured to identify one ormore of a participant-based artifact, environmental artifact, and acap-based artifact comprises the data processor being configured to:obtain artifact models from an artifact database; compare one or morefeatures of the artifact to the artifact models; determine that asimilarity between the one or more features of the artifact and one ofthe artifact models satisfies a similarity threshold; and determine thatthe brainwave data includes one or more of a participant-based artifact,environmental artifact, and a cap-based artifact in response todetermining that the similarity threshold is satisfied.
 14. The systemof claim 12, wherein the data processor being configured to obtain theoutput message template corresponding to the artifact that is likelypresent in the brainwave data comprises the data processor beingconfigured to: transmit, to a mapping table database, a request for anoutput message template corresponding to the one or more of aparticipant-based artifact, environmental artifact, and a cap-basedartifact identified in the brainwave data; and receive, from the mappingtable database, the output message template.
 15. A non-transitorycomputer-readable storage medium comprising instructions, which whenexecuted by one or more computers, cause the one or more computers toexecute operations comprising: obtaining brainwave data from a wearabledevice comprising brainwave sensors; determining that an artifact islikely present in the brainwave data by performing an artifact detectionprocess comprising a p-welch method, wherein performing the P-welchmethod comprises: generating frequency brainwave data from the brainwavedata obtained from the brainwave sensors; generating a power spectrum ofthe frequency brainwave data; applying a first degree polynomial to alogged representation of the power spectrum; and determining that aslope of the first degree polynomial or shape of the loggedrepresentation of the power spectrum corresponds to a slope or shapeassociated with an artifact; obtaining an output message templatecorresponding to the artifact that is likely present in the brainwavedata; and generating an output indicative of a quality of the brainwavedata based on the output message template corresponding to the artifactthat that is likely present in the brainwave data.
 16. Thenon-transitory computer-readable storage medium of claim 15, whereindetermining that an artifact is likely present in the brainwave datacomprises performing two or more of a line noise signal to noise ratio(SNR)-based determination, a mutual information-based determination, andthe P-welch method.
 17. The non-transitory computer-readable storagemedium of claim 15, further comprising: identifying, based on one ormore features of the artifact, a type of the artifact as one or more ofa participant-based artifact, environmental artifact, and a cap-basedartifact in the brainwave data in response to determining that anartifact is likely present in the brainwave data.
 18. The non-transitorycomputer-readable storage medium of claim 17, wherein identifying typeof the artifact as one or more of a participant-based artifact,environmental artifact, and a cap-based artifact comprises: obtainingartifact models from an artifact database; comparing the one or morefeatures of the artifact to the artifact models; determining that asimilarity between the one or more features of the artifact and one ofthe artifact models satisfies a similarity threshold; and determiningthat the brainwave data includes one or more of a participant-basedartifact, environmental artifact, and a cap-based artifact in responseto determining that the similarity threshold is satisfied.
 19. Thenon-transitory computer-readable storage medium of claim 17, whereinobtaining the output message template corresponding to the artifact thatis likely present in the brainwave data comprises: transmitting, to amapping table database, a request for an output message templatecorresponding to the one or more of a participant-based artifact,environmental artifact, and a cap-based artifact identified in thebrainwave data; and receiving, from the mapping table database, theoutput message template.
 20. A computer-implemented method executed byone or more processors and comprising: obtaining brainwave data from awearable device comprising brainwave sensors; determining that anartifact is likely present in the brainwave data and identifying one ormore features of the artifact by performing an artifact detectionprocess comprising one or more of a line noise signal to noise ratio(SNR)-based determination, a mutual information-based determination, anda P-welch method; identifying a type of the artifact by: obtainingartifact models from an artifact database; comparing the one or morefeatures of the artifact to the artifact models; determining that asimilarity between the one or more features of the artifact and one ofthe artifact models satisfies a similarity threshold; and determiningthat the brainwave data includes one or more of a participant-basedartifact, environmental artifact, and a cap-based artifact in responseto determining that the similarity threshold is satisfied; obtaining anoutput message template corresponding to the type of the artifact thatis likely present in the brainwave data; and generating an outputindicative of a quality of the brainwave data based on the outputmessage template corresponding to the type of the artifact that islikely present in the brainwave data.
 21. A system comprising: awearable device comprising brainwave sensors configured to obtainbrainwave data; and a data processor communicably coupled to thebrainwave sensors, the data processor being configured to: determinethat an artifact is likely present in the brainwave data and identifyone or more features of the artifact by performing an artifact detectionprocess comprising one or more of a line noise signal to noise ratio(SNR)-based determination, a mutual information-based determination, anda p-welch method; identify a type of the artifact by: obtaining artifactmodels from an artifact database; comparing the one or more features ofthe artifact to the artifact models; determining that a similaritybetween the one or more features of the artifact and one of the artifactmodels satisfies a similarity threshold; and determining that thebrainwave data includes one or more of a participant-based artifact,environmental artifact, and a cap-based artifact in response todetermining that the similarity threshold is satisfied; obtain an outputmessage template corresponding to the type of the artifact that islikely present in the brainwave data; and generate an output indicativeof a quality of the brainwave data based on the output message templatecorresponding to the type of the artifact that is likely present in thebrainwave data.
 22. A non-transitory computer-readable storage mediumcomprising instructions, which when executed by one or more computers,cause the one or more computers to execute operations comprising:obtaining brainwave data from a wearable device comprising brainwavesensors; determining that an artifact is likely present in the brainwavedata and identifying one or more features of the artifact by performingan artifact detection process comprising one or more of a line noisesignal to noise ratio (SNR)-based determination, a mutualinformation-based determination, and a P-welch method; identifying atype of the artifact by: obtaining artifact models from an artifactdatabase; comparing the one or more features of the artifact to theartifact models; determining that a similarity between the one or morefeatures of the artifact and one of the artifact models satisfies asimilarity threshold; and determining that the brainwave data includesone or more of a participant-based artifact, environmental artifact, anda cap-based artifact in response to determining that the similaritythreshold is satisfied; obtaining an output message templatecorresponding to the type of the artifact that is likely present in thebrainwave data; and generating an output indicative of a quality of thebrainwave data based on the output message template corresponding to thetype of the artifact that is likely present in the brainwave data.